BIN=count
CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
CFLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
		@$(CC) $(LFLAGS) $@ $^ #就是这个L的单词写错了：
		@echo " 链接$^ 成为 $@"
%.o:%.c
		@$(CC) $(CFLAGS) $<
		@echo "编译$< 成为 $@"

.PHONY:clean
clean:
		@$(RM) $(OBJ) $(BIN)
		@echo "清理工程完毕"

.PHONY:print
print:
		@echo $(SRC)
		@echo "-----------------------"
		@echo $(OBJ)

